<template>
    <div>
        <!-- <div class="tab_qiehuan">
                <span @click="changePlayMethods(true)" :class="{'wanfa':active}">官方玩法</span>
                <span @click="changePlayMethods(false)" :class="{'wanfa2':!active}">信用玩法</span>
        </div> -->
        <router-view  />
    </div>
</template>
<script>
export default {
    data () {
        return {
            active: true
        }
    },
    created () {
        const { playMethods } = this.$route.params
//      console.log(playMethods)
        if(playMethods === 'guanfang') {
            this.active = true
            // this.$router.push('/guanfang/wuxingfushi')
        } else if (playMethods === 'xinyong') {
            this.active = false
            // this.$router.push('/xinyong/wuxingfushi')
        }
    },
    methods: {
        changePlayMethods (bool) {
            console.log(this.$route)
            const { name, path } = this.$route
            this.active = bool
            if(bool) {
                this.$router.push('/guanfang/' + name)
            } else {
                 this.$router.push('/xinyong/' + name)
            }
        }
    }
}
</script>